package team.xstudio.bedwarstoolkit.misc

import net.minecraft.core.registries.Registries
import net.minecraft.world.item.CreativeModeTab
import net.minecraft.world.item.Items
import net.minecraftforge.registries.DeferredRegister
import team.xstudio.bedwarstoolkit.BedWarsToolkit
import team.xstudio.bedwarstoolkit.utils.BWUtils

/**
 * Created in 2025/6/10
 * Project: bedwarstoolkit
 *
 * @author <a href="https://github.com/Bread-Nicecat">Bread_NiceCat</a>
 * <p>
 *
 * <p>
 **/
object BWTabs {
    val REGISTER: DeferredRegister<CreativeModeTab> =
        DeferredRegister.create(Registries.CREATIVE_MODE_TAB, BedWarsToolkit.Companion.MOD_ID)

    init {
        BWUtils.LOGGER.info("Register Creative Tabs")
        REGISTER.register("bwt_items") {
            CreativeModeTab.builder().apply {
                icon { Items.RED_BED.asItem().defaultInstance }
                displayItems { param, output ->
                    {
                        output.acceptAll(
                            listOf(
                                BWItems.tnt(),
                                BWItems.fireball()
                            )
                        )
                    }
                }
            }.build()
        }
    }
}